import duckdb

con = duckdb.connect(database='d://db//my4d.duckdb', read_only=True)

with open('bymonth.sql', 'r', encoding='utf-8') as f:
    sql = f.read()
    con.execute(sql)

sql = f"execute gettaxbymonth(nd:= 2024, jedw:= 100000000, dw:= '143%')"
df = con.execute(sql).df()

print(df.to_json(orient='values'))